package com.bsoft.gol.hcs.enumcase;

/**
 * @author fzy91
 * @title: FactorTimeStatusEnum
 * @projectName GOL-ssdev4
 * @description: TODO
 * @date 2022/6/114:59
 */
public enum FactorTimeStatusEnum {
    YES((byte) 1, "是"),
    NO((byte) 2, "否");

    private final Byte type;

    private final String name;

    FactorTimeStatusEnum(Byte type, String name) {
        this.type = type;
        this.name = name;
    }

    public static FactorTimeStatusEnum getEnumByKey(Byte type) {
        for (FactorTimeStatusEnum temp : FactorTimeStatusEnum.values()) {
            if (temp.getType().equals(type)) {
                return temp;
            }
        }
        return null;
    }

    public Byte getType() {
        return type;
    }

    public String getName() {
        return name;
    }
}
